<extend name="public/base"/>

<block name="header">
    <li class="success"><a href="javascript:;">安装协议<img src="__IMG__/bullet_green.png" /></a></li>
    <li class="success"><a href="javascript:;">环境检测<img src="__IMG__/bullet_green.png" /></a></li>
    <li class="success"><a href="javascript:;">创建数据库<img src="__IMG__/bullet_green.png" /></a></li>
    <li class="active"><a href="javascript:;">安装</a></li>
    <li><a href="javascript:;">完成</a></li>
</block>

<block name="body">
<div class="container" id="step4">
	<div class="logo"  style="">
		<h3>安装</h3>
	    <div id="show-list" class="install-database" style="height:500px;overflow: auto;border:0px;">
	    </div>
	    <script type="text/javascript">
			var list   = document.getElementById('show-list');
			function showmsg(msg, classname){
				var li = document.createElement('p'); 
				li.innerHTML = msg;
				classname && li.setAttribute('class', classname);
				list.appendChild(li);
				var w = document.getElementById("progress-inner").getAttribute("title");
				var n = Math.min( Math.random() * 2, 100 );
				var a = parseFloat(w)+parseFloat(n);
				document.getElementById("install-tip").setAttribute('class', 'layui-btn layui-btn-radius layui-btn-disabled state-loading');
				
				if( parseInt(w) > 100 ) {
					document.getElementById("install-tip").setAttribute('class', 'layui-btn layui-btn-radius layui-btn-disabled finished');
					document.getElementById("progress-inner").style.width = '100%';
				}else{
					document.getElementById("progress-inner").setAttribute('title', a);
					document.getElementById("progress-inner").style.width = a+'%';
				}
			}
			function showovermsg(msg,url){
				document.getElementById("progress-inner").style.width = '100%';
				document.getElementById("install-tip").setAttribute('class', 'layui-btn layui-btn-radius finished');
				document.getElementById("msg").innerHTML = msg;
				document.getElementById("install-tip").setAttribute('onclick', 'location.href="'+url+'"');
			}
	    </script>
	    <div class="footer">
			<button class="layui-btn layui-btn-radius layui-btn-disabled" id="install-tip">
			<span class="content" id="msg">正在安装，稍候片刻...</span>
			<span class="progress"><span class="progress-inner notransition" id="progress-inner" style="width: 0%; opacity: 1;" title="0"></span></span>
			</button>
			<i class="layui-icon" id="view-list" title="查看安装进度" style="font-size: 30px; color: #1E9FFF;margin-left:20px;line-height: 38px;display: inline-block;vertical-align: bottom;cursor:pointer;">&#xe609;</i>  
		</div>
	</div>

</div>
</block>

<block name="footer">
</block>